import request from "@/utils/request";
import cookie from 'js-cookie'
export default{
    isBuyCourse(courseId){
        return request({
            url:`http://localhost:8225/api/trade/order/is-buy-course/${courseId}`,
            method:"get",
            headers:{'token':cookie.get("jwt-token")}
        })
    },
    createOrder(courseId){
        return request({
            url:`http://localhost:8117/api/trade/order/create/${courseId}`,
            method:"post",
            headers:{'token':cookie.get("jwt-token")}
        })
    },
    fecthOrder(courseId){
        return request({
            url:`http://localhost:8225/api/trade/order/get-order-info/${courseId}`,
            method:'get',
            headers:{'token':cookie.get("jwt-token")}
        })
    }    
}